<?php
/**
 * Created by PhpStorm.
 * User: chengxun
 * Date: 2017/7/18
 * Time: 16:14
 */
use think\Route;
use think\Request;
use app\common\model\DomainConfig;
$host =  Request::instance()->host();
$domain_model = new DomainConfig();
$domain_data = $domain_model->get_host_module($host);
if($host !== null){
    if(empty($domain_data)){
        if(Request::instance()->isMobile()){
            header('Location: www.748dw.com');
            exit;
        }else{
            header('Location: www.748dw.com');
            exit;
        }
    }else{
        Route::domain($host,$domain_data['module']);
    }
}
